package com.hbvtc.xxxy.nikeSale.frames;

import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

import com.hbvtc.xxxy.nikeSale.models.Salesman;

public class VipNike extends JFrame implements ActionListener {
	JLabel jLabel1, jLabel2, jLabel3;
	JPanel jPanel;
	JButton jButton1, jButton2, jButton3, jButton4,jButton5;
	JTextField jTextField;

	public VipNike() {
		this.setTitle("会员信息界面");
		this.setSize(1000,700);
		this.setLocationRelativeTo(null);
		this.setVisible(true);

		// 设置标题栏的图标
		ImageIcon imageIcon = new ImageIcon(getClass().getResource("01.png"));
		this.setIconImage(imageIcon.getImage());
		String path = "images/001.jpg";
		ImageIcon background = new ImageIcon(path);
		JLabel label = new JLabel(background);
		label.setBounds(0, 0, this.getWidth(), this.getHeight());
		JPanel imagePanel = (JPanel) this.getContentPane();
		imagePanel.setOpaque(false);
		this.getLayeredPane().add(label, new Integer(Integer.MIN_VALUE));
		this.setVisible(true);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		this.setLayout(null);
		jButton1 = new JButton("查询会员信息");
		jButton2 = new JButton("添加会员信息");
		jButton3 = new JButton("删除会员信息");
		jButton4 = new JButton("修改会员信息");
		jButton5 = new JButton("返   回");

		this.add(jButton1);
		this.add(jButton2);
		this.add(jButton3);
		this.add(jButton4);
		this.add(jButton5);

		jButton1.setBounds(340, 100, 230, 50);
		jButton1.setFont(new Font(null, 0, 24));
		jButton2.setBounds(340, 210, 230, 50);
		jButton2.setFont(new Font(null, 0,24));
		jButton3.setBounds(340, 330, 230, 50);
		jButton3.setFont(new Font(null, 0, 24));
		jButton4.setBounds(340, 440, 230, 50);
		jButton4.setFont(new Font(null, 0, 24));
		jButton5.setBounds(700, 550, 110, 40);
		jButton5.setFont(new Font(null, 0, 24));
		

		jButton1.addActionListener(this);
		jButton2.addActionListener(this);
		jButton3.addActionListener(this);
		jButton4.addActionListener(this);
		jButton5.addActionListener(this);
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		 //TODO Auto-generated method stub
		if(e.getSource()==jButton1){			
			new SelectVipNike();			
	   }if(e.getSource()==jButton2){
		    new AddVipNike();
	   }if(e.getSource()==jButton3){
		    new DelVipNike();
	   }if(e.getSource()==jButton4){
		    new UpdateVipNike();
	   }if(e.getSource()==jButton5){
		   dispose();
		    new SuccessSalesmanNike();
	   }
	}

	public static void main(String[] args) {
		new VipNike();
	}
}
